home *** CD-ROM | disk | FTP | other *** search
/ Collection of Tools & Utilities / Collection of Tools and Utilities.iso / bbsutil / hsrc_117.zip / SHOWHDR.C < prev    next >
C/C++ Source or Header  |  1990-10-29  |  2KB  |  76 lines

  1. #include "msgg.h"
  2. #include "twindow.h"
  3. #include "headedit.h"
  4.  
  5. extern word threadstart;
  6.  
  7.  
  8. /* Prints header info on top few lines */
  9.  
  10. void pascal show_header (char quick) {
  11.  
  12.   if(!quick) {
  13.     current_color=readstatcolor + (readstatback * 16);
  14.     dputs(1,5,"≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡");
  15.     if(threadstart) dputs(1,5,"=");
  16.     if (msg.attr & MSGPRIVATE) {
  17.         dputs(2,5,"Prv");
  18.     }
  19.     if (msg.m_attr & MSGDELETED) {
  20.         dputs(7,5,"Del");
  21.     }
  22.     if (msg.attr & MSGSENT) {
  23.         dputs(12,5,"Snt");
  24.     }
  25.     if (msg.attr & MSGCRASH) {
  26.         dputs(17,5,"Crsh");
  27.     }
  28.     if (msg.attr & MSGREAD) {
  29.         dputs(23,5,"Rd");
  30.     }
  31.     if (msg.m_attr & MSGANON) {
  32.         dputs(27,5,"Anon");
  33.     }
  34.     if (areano<(totalareas+1) && messno>lastread[areano-1]) {
  35.         dputs(33,5,"New");
  36.     }
  37.     if(msg.m_attr & MSGKEEP) {
  38.         dputs(37,5,"Kp");
  39.     }
  40.     if(msg.m_attr & MSGNET) {
  41.         dputc(41,5,'N');
  42.     }
  43.     if(msg.m_attr & MSGECHO) {
  44.         dputc(41,5,'E');
  45.     }
  46.     if ((currarea->attr & NET) || (currarea->attr & ALTERNATE)) {
  47.         dprintf(43,5,"%u:%u/%u.%01u\x1a%u:%u/%u.%01u",msg.o_zone,msg.orig_net,msg.orig,msg.o_point,msg.d_zone,msg.dest_net,msg.dest,msg.d_point);
  48.     }
  49.   }
  50.   current_color=readheadcolor+(readheadback*16);
  51.   dclrwnd(1,1,maxx,4);
  52.   dprintf(1,1,"Fm: %-35.35s To: %-35.35s",msg.from,msg.to);
  53.   ((msg.attr & MSGFILE) + (msg.attr & MSGURQ) + (msg.attr & MSGFRQ)) ? dputs(1,2,"File: ") : dputs(1,2,"Subj: ");
  54.   dprintf(8,2,"%-63.63s",msg.subj);
  55.   dprintf(1,3,"Date: %-20.20s | #%u of %u in Area #%u",msg.date,messno,nomess,areano);
  56.   dputs(1,4,"Attr:  ");
  57.   dputs(8,4,quick_attr());
  58.   dprintf(62,4,"Area: %1.12s",currarea->name);
  59. }
  60.  
  61.  
  62.  
  63. /* Formatted 'printf-style' output through pd screen writer */
  64.  
  65. int cdecl dprintf (int x,int y,char *string,...) {
  66.  
  67.  char buffer[512];
  68.  
  69.     va_list ap;
  70.     va_start(ap,string);
  71.     vsprintf(buffer,string,ap);
  72.     va_end(ap);
  73.     return(dputs(x,y,buffer));
  74. }
  75.  
  76.